/**
 * src/config/identityConfig.ts
 * ------------------------------------
 * 身份与亲密度系统配置文件
 * 1. IDENTITY_CONFIG：所有可选择的身份信息配置
 * 2. FAMILY_SPECIAL_DISHES：家人身份可解锁的特殊菜品
 * 3. FRIEND_STICKER_STORIES：朋友身份可解锁的贴图故事
 * 4. INTIMACY_RULES：亲密度获取规则（点餐、评价、分享等）
 * 5. INTIMACY_LEVELS：亲密度等级配置
 * 6. SPECIAL_HOLIDAYS：特殊节日配置
 * 所有身份相关的配置数据都集中在此文件
 * 创建日期：2025-08-06
 */
import { IdentityType, FamilyIdentity, FriendIdentity, IdentityInfo, FamilySpecialDish, FriendStickerStory } from '../types/identity'

/**
 * 身份配置 - 定义所有可选择的身份信息
 * 包括家人身份和好友身份，每个身份都有对应的图标、描述和初始亲密度
 */
export const IDENTITY_CONFIG: Record<string, IdentityInfo> = {
  // 家人身份配置
  [FamilyIdentity.MOM]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.MOM,
    name: '妈妈',
    icon: '👩‍👧',
    description: '解锁妈妈专属菜品',
    initialIntimacy: 50
  },
  [FamilyIdentity.DAD]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.DAD,
    name: '爸爸',
    icon: '👨‍👧',
    description: '解锁爸爸专属菜品',
    initialIntimacy: 50
  },
  [FamilyIdentity.SISTER]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.SISTER,
    name: '姐姐',
    icon: '👧',
    description: '解锁姐姐专属菜品',
    initialIntimacy: 45
  },
  [FamilyIdentity.BROTHER]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.BROTHER,
    name: '弟弟',
    icon: '👦',
    description: '解锁弟弟专属菜品',
    initialIntimacy: 45
  },
  [FamilyIdentity.GRANDPA]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.GRANDPA,
    name: '爷爷',
    icon: '👴',
    description: '解锁爷爷专属菜品',
    initialIntimacy: 60
  },
  [FamilyIdentity.GRANDMA]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.GRANDMA,
    name: '奶奶',
    icon: '👵',
    description: '解锁奶奶专属菜品',
    initialIntimacy: 60
  },
  [FamilyIdentity.OTHER_FAMILY]: {
    type: IdentityType.FAMILY,
    subType: FamilyIdentity.OTHER_FAMILY,
    name: '其他家人',
    icon: '👨‍👩‍👧‍👦',
    description: '解锁家人专属菜品',
    initialIntimacy: 40
  },

  // 好友身份配置
  [FriendIdentity.BEST_FRIEND]: {
    type: IdentityType.FRIEND,
    subType: FriendIdentity.BEST_FRIEND,
    name: '闺蜜',
    icon: '👭',
    description: '解锁闺蜜贴图故事',
    initialIntimacy: 30
  },
  [FriendIdentity.COLLEAGUE]: {
    type: IdentityType.FRIEND,
    subType: FriendIdentity.COLLEAGUE,
    name: '同事',
    icon: '👔',
    description: '解锁同事贴图故事',
    initialIntimacy: 25
  },
  [FriendIdentity.CLASSMATE]: {
    type: IdentityType.FRIEND,
    subType: FriendIdentity.CLASSMATE,
    name: '同学',
    icon: '🎓',
    description: '解锁同学贴图故事',
    initialIntimacy: 25
  },
  [FriendIdentity.NEIGHBOR]: {
    type: IdentityType.FRIEND,
    subType: FriendIdentity.NEIGHBOR,
    name: '邻居',
    icon: '🏠',
    description: '解锁邻居贴图故事',
    initialIntimacy: 20
  },
  [FriendIdentity.OTHER_FRIEND]: {
    type: IdentityType.FRIEND,
    subType: FriendIdentity.OTHER_FRIEND,
    name: '其他朋友',
    icon: '👥',
    description: '解锁朋友贴图故事',
    initialIntimacy: 20
  }
}

/**
 * 家人特殊菜品配置 - 定义家人身份可以解锁的特殊菜品
 * 每个菜品都有对应的身份要求、亲密度要求和特殊故事
 */
export const FAMILY_SPECIAL_DISHES: FamilySpecialDish[] = [
  {
    id: 'lobster_mom',
    dishId: 'special_lobster_mom',
    dishName: '妈妈的小龙虾',
    requiredIdentity: FamilyIdentity.MOM,
    requiredIntimacy: 80,
    unlockMessage: '妈妈，您辛苦了！这是专门为您准备的小龙虾',
    specialStory: '妈妈最爱吃小龙虾，每次看到都会很开心。记得小时候，妈妈总是把最好的留给我，现在轮到我照顾妈妈了。',
    icon: '🦞',
    image: '/assets/images/special-dishes/lobster-mom.png'
  },
  {
    id: 'steak_dad',
    dishId: 'special_steak_dad',
    dishName: '爸爸的牛排',
    requiredIdentity: FamilyIdentity.DAD,
    requiredIntimacy: 75,
    unlockMessage: '爸爸，这是您最爱的牛排',
    specialStory: '爸爸工作很辛苦，牛排能给他补充能量。爸爸总是默默付出，现在我要让他享受美食。',
    icon: '🥩',
    image: '/assets/images/special-dishes/steak-dad.png'
  },
  {
    id: 'cake_sister',
    dishId: 'special_cake_sister',
    dishName: '姐姐的生日蛋糕',
    requiredIdentity: FamilyIdentity.SISTER,
    requiredIntimacy: 70,
    unlockMessage: '姐姐生日快乐！',
    specialStory: '姐姐总是照顾我，现在轮到我照顾她了。这个蛋糕代表我对姐姐的爱。',
    icon: '🎂',
    image: '/assets/images/special-dishes/cake-sister.png'
  },
  {
    id: 'pizza_brother',
    dishId: 'special_pizza_brother',
    dishName: '弟弟的披萨',
    requiredIdentity: FamilyIdentity.BROTHER,
    requiredIntimacy: 65,
    unlockMessage: '弟弟，这是你最爱吃的披萨',
    specialStory: '弟弟总是和我分享零食，现在我要给他最好的披萨。',
    icon: '🍕',
    image: '/assets/images/special-dishes/pizza-brother.png'
  },
  {
    id: 'tea_grandpa',
    dishId: 'special_tea_grandpa',
    dishName: '爷爷的养生茶',
    requiredIdentity: FamilyIdentity.GRANDPA,
    requiredIntimacy: 85,
    unlockMessage: '爷爷，这是为您准备的养生茶',
    specialStory: '爷爷喜欢喝茶，这个养生茶能让他更健康。',
    icon: '🍵',
    image: '/assets/images/special-dishes/tea-grandpa.png'
  },
  {
    id: 'soup_grandma',
    dishId: 'special_soup_grandma',
    dishName: '奶奶的暖心汤',
    requiredIdentity: FamilyIdentity.GRANDMA,
    requiredIntimacy: 85,
    unlockMessage: '奶奶，这是为您准备的暖心汤',
    specialStory: '奶奶总是给我煮汤，现在我要给她最暖心的汤。',
    icon: '🥣',
    image: '/assets/images/special-dishes/soup-grandma.png'
  }
]

/**
 * 好友贴图故事配置 - 定义好友身份可以解锁的贴图故事
 * 每个故事都有对应的身份要求、亲密度要求和故事内容
 */
export const FRIEND_STICKER_STORIES: FriendStickerStory[] = [
  {
    id: 'best_friend_hug',
    stickerId: 'sticker_best_friend_hug',
    stickerName: '闺蜜抱抱',
    requiredIdentity: FriendIdentity.BEST_FRIEND,
    requiredIntimacy: 60,
    storyContent: '和闺蜜一起分享美食的快乐时光，永远的好姐妹！',
    unlockCondition: '与闺蜜亲密度达到60',
    icon: '🤗',
    previewImage: '/assets/images/stickers/best-friend-hug.png'
  },
  {
    id: 'colleague_team',
    stickerId: 'sticker_colleague_team',
    stickerName: '同事团队',
    requiredIdentity: FriendIdentity.COLLEAGUE,
    requiredIntimacy: 50,
    storyContent: '和同事们一起享受工作餐的美好时光，团队合作最棒！',
    unlockCondition: '与同事亲密度达到50',
    icon: '👥',
    previewImage: '/assets/images/stickers/colleague-team.png'
  },
  {
    id: 'classmate_memory',
    stickerId: 'sticker_classmate_memory',
    stickerName: '同学回忆',
    requiredIdentity: FriendIdentity.CLASSMATE,
    requiredIntimacy: 45,
    storyContent: '和同学们一起回忆学生时代的美好时光！',
    unlockCondition: '与同学亲密度达到45',
    icon: '🎓',
    previewImage: '/assets/images/stickers/classmate-memory.png'
  },
  {
    id: 'neighbor_chat',
    stickerId: 'sticker_neighbor_chat',
    stickerName: '邻居聊天',
    requiredIdentity: FriendIdentity.NEIGHBOR,
    requiredIntimacy: 40,
    storyContent: '和邻居一起聊天分享生活的美好时光！',
    unlockCondition: '与邻居亲密度达到40',
    icon: '🏠',
    previewImage: '/assets/images/stickers/neighbor-chat.png'
  }
]

/**
 * 亲密度获取规则 - 定义各种行为可以获得的亲密度点数
 */
export const INTIMACY_RULES = {
  ORDER: 2,           // 每次点餐 +2
  RATING: 1,          // 每次评价 +1
  SHARE: 1,           // 每次分享 +1
  BIRTHDAY: 10,       // 生日当天 +10
  HOLIDAY: 15,        // 特殊节日 +15
  DAILY_LOGIN: 1,     // 每日登录 +1
  CONSECUTIVE_ORDER: 5 // 连续7天点餐 +5
}

/**
 * 亲密度等级配置 - 定义每个等级的名称和分数范围
 */
export const INTIMACY_LEVELS = {
  [0]: { name: '陌生人', range: [0, 10] },
  [1]: { name: '熟人', range: [11, 30] },
  [2]: { name: '朋友', range: [31, 60] },
  [3]: { name: '亲密', range: [61, 90] },
  [4]: { name: '家人', range: [91, 100] }
}

/**
 * 特殊节日配置 - 定义特殊节日及其对应的亲密度奖励
 */
export const SPECIAL_HOLIDAYS = [
  { name: '母亲节', date: '05-08', intimacy: 15 },
  { name: '父亲节', date: '06-19', intimacy: 15 },
  { name: '中秋节', date: '09-15', intimacy: 15 },
  { name: '春节', date: '02-10', intimacy: 20 }
] 